package chances.system.json;

public class JsonResponse {
	final public static int RESULT_SUCCESS = 0;
    final public static int RESULT_FAILED = 1;
    final public static int RESULT_DUPLICATE = 2;
    final public static int RESULT_BLACK_LIST = 3;

	private int result;
	private String message;
	private Object data;

	public JsonResponse() {
		this.result = RESULT_SUCCESS;
		this.message = "";
	}

	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

    public void setErrorResult(String message) {
        this.result = RESULT_FAILED;
        this.message = message;
    }
    
    public void setDuplicateResult(String message) {
        this.result = RESULT_DUPLICATE;
        this.message = message;
    }
    
    public void setBlackListResult(String message) {
        this.result = RESULT_BLACK_LIST;
        this.message = message;
    }

}
